package Demo1;

public class Rectangle {
    private int length;
    private int width;
    public Rectangle(int length,int width){
        this.length=length;
        this.width=width;
    }
    private void testPerimeter(){
        int perimeter=(length+width)*2;
        System.out.println("perimeter="+perimeter);
    }
    private void testArea(){
        int area=length*width;
        System.out.println("area="+area);
    }

    public static void main(String[] args) {
        Rectangle rectangle=new Rectangle(6,8);
        rectangle.testPerimeter();
        rectangle.testArea();
    }
}
